<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <!--include head-->
        <%- include("../general/head.html", undefined) %>
        <!--end of include head-->
    </head>
    <body>
        <!--jumbotron-->
        <%- include("../general/jumbotron.html", undefined) %>
        <!--jumbotron-->
        <!--container-fluid-->
        <div class="container-fluid">
            <!--classifications row-->
            <div class="row">
                <!--include classifications-->
                <%- include("../general/classifications.html", undefined) %>
                <!--end-->
            </div>
            <!--end of classifications row-->
            <!--contents row-->
            <div class="contents-row row">
                <div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1">
                    <%
                        var length = tags.length;
                        var remainder = length % tagsPerRow;
                        var rows = Math.floor(length / tagsPerRow);
                    %>
                    <% for ( var i = 0; i < rows; i++) { %>
                    <div class="tag-row row">
                        <% for (var j = i * tagsPerRow; j < i * tagsPerRow + tagsPerRow; j++) { %>
                        <div class="tag-column col-md-2 col-sm-3 col-xs-4">
                            <a><span class="tag label label-default"><%= tags[j].name %></span></a>
                        </div>
                        <% } %>
                    </div>
                    <% } %>

                    <% if (remainder !== 0) { %>
                        <div class="tag-row row">
                            <% for (var k = rows * tagsPerRow; k < rows * tagsPerRow + remainder; k++) { %>
                            <div class="tag-column col-md-2 col-xs-3 col-xs-4">
                                <a><span class="tag label label-default"><%= tags[k].name %></span></a>
                            </div>
                            <% } %>
                        </div>
                    <% } %>
                </div>
                <div class="col-md-2 col-sm-1"></div>
            </div>
            <!--end of contents row-->
            <!--page row-->
            <div class="page-row row">
            </div>
            <!--end of page row-->
        </div>
        <!--end of container-fluid-->
        <!--import javascripts-->
        <%- include("../general/javascripts.html", undefined) %>
		<!--end of import javascripts-->
    </body>
</html>
